package com.tanhua.server.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

//注意:在使用mybatisplus的枚举插件时,对应的类必须要实现IEnum接口
public enum SexEnum implements IEnum<Integer> {

    MAN(1,"男"),
    WOMAN(2,"女"),
    UNKNOWN(3,"未知");

    private int value; //指数据库中存储的值:1 2 3
    private String desc; //要显示的内容:男 女 未知

    SexEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return this.desc;
    }
}
